const router = require('koa-router')();
const controller = require('../controller/c-signin')

router.prefix('/login')

// 登录信息
// router.get('/signin', controller.getSignin)


/**
 * @swagger
 * definition:
 *  loginParams: 
 *      properties:
 *          name:
 *              type: string
 *          password:
 *              type: string
 */

/**
 * @swagger
 * /login/signin:
 *   post:
 *     summary: 用户登录信息接口
 *     description: 填入登录信息进行用户登录的应用
 *     tags:
 *       - 用户登录
 *     produces:
 *       - application/json
 *     parameters:
 *       - name: 'params'
 *         in: body
 *         required: true
 *         description: 登录信息
 *         schema:
 *           $ref: '#/definitions/loginParams'
 *     responses:
 *       200:
 *         description: 登录成功
 *         
 */
// 用户登录
router.post('/signin', controller.postSignin)

module.exports = router